package com.yingxin.yxerp.module.dingtalk.entity;

public enum WeComMessageTypeEnums {

    text("text", "文本消息"),
    image("image", "图片消息"),

    file("file", "文件消息"),
    ;

    private String type;

    private String typeName;

    WeComMessageTypeEnums(String type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public static WeComMessageTypeEnums getEnum(String type) {
        if (type == null) {
            return null;
        }
        for (WeComMessageTypeEnums i : WeComMessageTypeEnums.values()) {
            if (i.getType().equals(type)) {
                return i;
            }
        }
        return null;
    }

}
